import Vue from 'vue'
import Router from 'vue-router'
import index from '../blog/index/index'
import user from '../blog/article/user'
import detail from '../blog/article/detail'
import userhome from '../blog/user/userhome'
import usercenter from '../blog/user/children/usercenter'
import publish_aritcle from '../blog/user/children/publish_aritcle'
import userinfo from '../blog/user/children/userinfo'
import commentManager from '../blog/user/children/commentManager'
import articleManager from '../blog/user/children/articleManager'
import music from '../blog/music/music'


Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path : '/',
      component : index
    },
    {
      path : '/user',
      name : 'user',
      component : user
    },
    {
      path:'/detail',
      name:'detail',
      component: detail
    },
    {
      path:'/userhome',
      name:'userhome',
      component: userhome,
      children:[
        {
          //主页
          path : '/usercenter',
          name:'usercenter',
          component : usercenter,
        },
        {
          //发布文章
          path : '/publish_aritcle',
          name: 'publish_aritcle',
          component : publish_aritcle
        },
        {
          //个人信息
          path : '/userinfo',
          name: 'userinfo',
          component : userinfo
        },
        {
          //评论管理
          path : '/commentManager',
          name: 'commentManager',
          component : commentManager
        },
        {
          //评论管理
          path : '/articleManager',
          name: 'articleManager',
          component : articleManager
        }
      ]
    }
  ]
})
